﻿using Microsoft.CodeAnalysis;

namespace UIOC.CodeAnalysis.Diagnostics;

internal static class InstanceTypeAttributeInheritanceDiagnostic {

    public const string DiagnosticId = "UIOC0019";

    private const string Title = "'[InstanceType]' 重复性分析";
    private const string MessageFormat = "接口 ‘{0}’ 的基接口 '{1}' 已经标注 '[InstanceType]' 特性, 不可重复标注";
    private const string Description = "检测类的继承链中是否已经标注过 '[InstanceType]' 特性";
    private const string Category = "Usage";

    public static readonly DiagnosticDescriptor Rule = new(
        DiagnosticId,
        Title,
        MessageFormat,
        Category,
        DiagnosticSeverity.Error,
        isEnabledByDefault: true,
        description: Description
    );
}
